package com.nidu.demo.post.dto;

import com.nidu.demo.base.BaseCmd;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 职位添加命令
 *
 * @author auto
 */
@Data
@Schema(description = "职位添加命令")
@EqualsAndHashCode(callSuper = true)
public class PositionAddCmd extends BaseCmd {

    /**
     * 职位名称
     */
    @NotBlank(message = "职位名称不能为空")
    @Size(max = 64, message = "职位名称长度不能超过64个字符")
    @Schema(description = "职位名称", example = "Java开发工程师")
    private String postName;

    /**
     * 职位编码
     */
    @NotBlank(message = "职位编码不能为空")
    @Pattern(regexp = "^[A-Za-z0-9_]{2,32}$", message = "职位编码只能包含字母、数字和下划线，长度在2-32之间")
    @Schema(description = "职位编码", example = "java_dev")
    private String postCode;

    /**
     * 公司ID
     */
    @NotNull(message = "公司ID不能为空")
    @Schema(description = "公司ID", example = "1")
    private Long companyId;

    /**
     * 描述
     */
    @Size(max = 255, message = "描述长度不能超过255个字符")
    @Schema(description = "描述", example = "负责Java开发相关工作")
    private String remark;

} 